"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = Marks;

var React = _interopRequireWildcard(require("react"));

var _Mark = _interopRequireDefault(require("./Mark"));

function Marks(props) {
  var prefixCls = props.prefixCls,
      marks = props.marks,
      onClick = props.onClick;
  var markPrefixCls = "".concat(prefixCls, "-mark"); // Not render mark if empty

  if (!marks.length) {
    return null;
  }

  return /*#__PURE__*/React.createElement("div", {
    className: markPrefixCls
  }, marks.map(function (_ref) {
    var value = _ref.value,
        style = _ref.style,
        label = _ref.label;
    return /*#__PURE__*/React.createElement(_Mark.default, {
      key: value,
      prefixCls: markPrefixCls,
      style: style,
      value: value,
      onClick: onClick
    }, label);
  }));
}